<?php
/**
 * The Template for displaying all single posts.
 *
 * @package WordPress
 * @subpackage Twenty_Twelve
 * @since Twenty Twelve 1.0
 */

get_header(); news_style();?>
			<?php if ( have_posts() ) : the_post(); ?>
			<div class="main_title"><?php echo the_title();?></div><br /><br />
				<?php if(post_custom('keycontent')=='wingchun-family-chart')echo get_the_content();
				else echo content_with_gallery(get_the_content());?>
				

			<?php endif; // end of the loop. ?>
		<div class="cleaner" style="margin-top:30px;"><center><img src="<?php echo get_template_directory_uri(); ?>/images/endpage_icon.png" /></center></div>
		<?php		 
		 $args = array(
				'category__in'=>array(get_cat_ID('news'),get_cat_ID('gallery'),get_cat_ID('course')),
		 		'post__not_in'=>array(get_the_ID()),
		 		'showposts'=>15
			);						
		 query_posts($args);
		 $i=0;						
		?>
		<?php if(have_posts()):?>
		<div class="cleaner" style="margin-top:50px"></div>
		<div class="main_title">Tin tức khác</div><br /><br />
		<?php while(have_posts()):the_post();?>
			<div class="news_item"><a href="<?php echo the_permalink()?>"><?php the_title();?></a></div>
		<?php endwhile;endif;?>

		
<?php get_footer(); ?>